home *** CD-ROM | disk | FTP | other *** search
/ Greenhouse Effect Detection Expriment / NASA Greenhouse Effect Detection Expriment 1992 - Disc 2.iso / software / dos / cdf22pc / src / tools / message.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-27  |  1.7 KB  |  90 lines

  1. /******************************************************************************
  2. *
  3. *  NSSDC/CDF                        MESSAGE.C
  4. *
  5. *  Version 2.0, 27-Feb-92, ST Systems (STX)
  6. *
  7. *  Modification history:
  8. *
  9. *   V1.0  24-Jan-91, D Grogan/H Leckner       Original version (for CDF V2.0).
  10. *   V1.1  25-Mar-91, J Love           Cast malloc calls.
  11. *   V2.0  27-Feb-92, J Love           Modified for IBM-PC port.  CDF V2.2.
  12. *             H Leckner
  13. *
  14. ******************************************************************************/
  15.  
  16. #include <stdlib.h>
  17. #define MESSAGE 1
  18. #define CP (**c)
  19.  
  20. #include "wfl.h"
  21. #include "cdfdist.h"
  22. #include "cdfbrow.h"
  23.  
  24. void MESS_init ( c )
  25.  
  26.     struct mess_menu_struct    **c;
  27.  
  28. {
  29.                             /*CodeRef-mark*/
  30.  
  31.     long int    i;
  32.     /*long int    *ptr;*/
  33.  
  34.     *c = (struct mess_menu_struct *)
  35.         malloc(sizeof(struct mess_menu_struct));    /* V1.1 */
  36.  
  37.     set_pointer ((long *)&CP.window, (long) &mess_menu_inter);
  38.  
  39.     WFL_create_window ((struct window_struct *) CP.window);
  40.  
  41.     CP.num_elements = MESS_MENU_MAX_ELEMENT;
  42.  
  43.     for (i = 0 ; i < CP.num_elements ; i++)
  44.          {
  45.         set_pointer ((long *) &(CP.elements)[i], (long) &mess_menu[i]);
  46.          }
  47. #if defined(vms)
  48.     WFL_message_init (CP.window);
  49. #endif
  50.     global_mess_ptr = *c;
  51. }
  52.  
  53.  
  54.                             /*CodeRef-mark*/
  55. void MESS_draw (mess_menu_ptr)
  56.  
  57.     struct        mess_menu_struct    *mess_menu_ptr;
  58.  
  59. {
  60.                             /*CodeRef-mark*/
  61.  
  62.     WFL_draw_window ((*mess_menu_ptr).window);
  63. }
  64.  
  65.  
  66.  
  67.  
  68.                             /*CodeRef-mark*/
  69. void MESS_display (message,beep)
  70.  
  71.     char    message[];
  72.     int    beep;
  73. {
  74.                             /*CodeRef-mark*/
  75.  
  76.     WFL_message_display ((*global_mess_ptr).window, message, beep);
  77. }
  78.  
  79.  
  80.  
  81.                             /*CodeRef-mark*/
  82.  
  83. void MESS_erase_display (mess_menu_ptr)
  84. struct        mess_menu_struct    *mess_menu_ptr;
  85. {
  86. WFL_erase_display ((*mess_menu_ptr).window);
  87. }
  88.                             /*CodeRef-mark*/
  89.  
  90.